import {BrowserWindow, ipcMain} from "electron";

ipcMain.on('min-window', (event, arg) => {
    BrowserWindow.fromId(arg).minimize()
})

ipcMain.on('max-window', (event, arg) => {
    if (BrowserWindow.fromId(arg).isMaximized()) {
        BrowserWindow.fromId(arg).unmaximize()
    } else {
        BrowserWindow.fromId(arg).maximize()
    }
})

ipcMain.on('close-window', (event, arg) => {
    BrowserWindow.fromId(arg).close()
})